//
//  FirstModel.m
//  WaiBaoYuan
//
//  Created by user on 2017/4/21.
//  Copyright © 2017年 user. All rights reserved.
//

#import "FirstModel.h"

@implementation FirstModel
- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    if ([key  isEqual: @"id"]) {
        _myid = value;
    }
}

- (instancetype)initWithDic:(NSDictionary *)dic
{
    self = [super init];
    if (self) {
        [self setValuesForKeysWithDictionary:dic];
    }
    return self;
}
+ (instancetype)modelWithDic:(NSDictionary *)dic
{
    FirstModel *b = [[FirstModel alloc]initWithDic:dic];
    return b;
}


+ (NSMutableArray *)transformWithArry:(NSArray *)array
{
    NSMutableArray *temparr = [NSMutableArray array];
    //遍历数组
    for (NSDictionary *dic in array) {
        @autoreleasepool {
            
            
            //创建对象
            id m = [self modelWithDic:dic];
            //添加数组
            
            [temparr addObject:m];
        }
    }
    return temparr;
}
@end

